<?php
class Messages extends BaseModel
{
	public $res;
	public $expire;
	public function getSource()
    {
        return "f_messages";
    }

    /**
     * 保存
     */
    public function save_params($user_id, $tips, $title = '')
    {
        $this->user_id    = $user_id;
        $this->title      = $title;
        $this->content    = $tips;
        $this->created_at = date('Y-m-d H:i:s');
        $this->updated_at = date('Y-m-d H:i:s');
        $this->is_read    = 0;
        if (!$this->save()) {
            return false;
        }
        return true;
    }

}
